package com.ajie.slimming.db;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class DatabaseHelper extends SQLiteOpenHelper
{
    public static final int VERSION = 1;
    
    public static final String DB_NAME = "bloodpressure.db";
    
    List<Table> tables = new ArrayList<Table>();
    
    private static final String TAG = DatabaseHelper.class.getSimpleName();
    
    public DatabaseHelper(Context context)
    {
        super(context, DB_NAME, null, VERSION);
    }
    
    public void addTable(Table table)
    {
        Log.d(TAG, "Adding table " + table.getName());
        tables.add(table);
    }
    
    @Override
    public void onCreate(SQLiteDatabase db)
    {
        initTable(db);
    }
    
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
    {
    }
    
    private void initTable(SQLiteDatabase db)
    {
    }
    
}
